#ifndef BACKGROUND_H
#define BACKGROUND_H
#include<QGraphicsItem>
#include<QFileInfo>
#include<QGraphicsScene>
#include<QPainter>
#include<QDebug>
class BackGround:public QGraphicsItem
{


public:
    BackGround(QGraphicsScene* m_scene);
    virtual QRectF boundingRect() const;
    virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = nullptr);
    void updateslider();

    QPixmap *bg;//背景
    QString root;//路径
    QPixmap *fold;//中间线条
    QGraphicsScene* scene;
    QPixmap *lineH;//横线
    QPixmap *lineV;//竖线
    QPixmap *slider;
    QPixmap *slider_bg;
    float sliderx;//记录slider的位置
};

#endif // BACKGROUND_H
